home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / CMConversions.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  6.2 KB  |  232 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMConversions.a
  3. ;
  4. ;    Contains:    ColorSync Conversion Component API
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.0
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1993-1998 by Apple Computer, Inc. All rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__CMCONVERSIONS__') = 'UNDEFINED' THEN
  18. __CMCONVERSIONS__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  24.     include 'Components.a'
  25.     ENDIF
  26.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  27.     include 'CMApplication.a'
  28.     ENDIF
  29.  
  30.  
  31. CMConversionInterfaceVersion    EQU        1
  32. ;  Component function selectors 
  33.  
  34. kCMXYZToLab                        EQU        0
  35. kCMLabToXYZ                        EQU        1
  36. kCMXYZToLuv                        EQU        2
  37. kCMLuvToXYZ                        EQU        3
  38. kCMXYZToYxy                        EQU        4
  39. kCMYxyToXYZ                        EQU        5
  40. kCMRGBToHLS                        EQU        6
  41. kCMHLSToRGB                        EQU        7
  42. kCMRGBToHSV                        EQU        8
  43. kCMHSVToRGB                        EQU        9
  44. kCMRGBToGRAY                    EQU        10
  45. kCMXYZToFixedXYZ                EQU        11
  46. kCMFixedXYZToXYZ                EQU        12
  47. ;
  48. ; pascal ComponentResult CMXYZToLab(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  49. ;
  50.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  51.         Macro
  52.         _CMXYZToLab
  53.             move.l              #$00100000,-(sp)
  54.             moveq               #0,D0
  55.             dc.w                $A82A
  56.         EndM
  57.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  58.         IMPORT_CFM_FUNCTION CMXYZToLab
  59.     ENDIF
  60.  
  61. ;
  62. ; pascal ComponentResult CMLabToXYZ(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  63. ;
  64.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  65.         Macro
  66.         _CMLabToXYZ
  67.             move.l              #$00100001,-(sp)
  68.             moveq               #0,D0
  69.             dc.w                $A82A
  70.         EndM
  71.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  72.         IMPORT_CFM_FUNCTION CMLabToXYZ
  73.     ENDIF
  74.  
  75. ;
  76. ; pascal ComponentResult CMXYZToLuv(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  77. ;
  78.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  79.         Macro
  80.         _CMXYZToLuv
  81.             move.l              #$00100002,-(sp)
  82.             moveq               #0,D0
  83.             dc.w                $A82A
  84.         EndM
  85.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  86.         IMPORT_CFM_FUNCTION CMXYZToLuv
  87.     ENDIF
  88.  
  89. ;
  90. ; pascal ComponentResult CMLuvToXYZ(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  91. ;
  92.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  93.         Macro
  94.         _CMLuvToXYZ
  95.             move.l              #$00100003,-(sp)
  96.             moveq               #0,D0
  97.             dc.w                $A82A
  98.         EndM
  99.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  100.         IMPORT_CFM_FUNCTION CMLuvToXYZ
  101.     ENDIF
  102.  
  103. ;
  104. ; pascal ComponentResult CMXYZToYxy(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  105. ;
  106.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  107.         Macro
  108.         _CMXYZToYxy
  109.             move.l              #$000C0004,-(sp)
  110.             moveq               #0,D0
  111.             dc.w                $A82A
  112.         EndM
  113.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  114.         IMPORT_CFM_FUNCTION CMXYZToYxy
  115.     ENDIF
  116.  
  117. ;
  118. ; pascal ComponentResult CMYxyToXYZ(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  119. ;
  120.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  121.         Macro
  122.         _CMYxyToXYZ
  123.             move.l              #$000C0005,-(sp)
  124.             moveq               #0,D0
  125.             dc.w                $A82A
  126.         EndM
  127.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  128.         IMPORT_CFM_FUNCTION CMYxyToXYZ
  129.     ENDIF
  130.  
  131. ;
  132. ; pascal ComponentResult CMRGBToHLS(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  133. ;
  134.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  135.         Macro
  136.         _CMRGBToHLS
  137.             move.l              #$000C0006,-(sp)
  138.             moveq               #0,D0
  139.             dc.w                $A82A
  140.         EndM
  141.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  142.         IMPORT_CFM_FUNCTION CMRGBToHLS
  143.     ENDIF
  144.  
  145. ;
  146. ; pascal ComponentResult CMHLSToRGB(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  147. ;
  148.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  149.         Macro
  150.         _CMHLSToRGB
  151.             move.l              #$000C0007,-(sp)
  152.             moveq               #0,D0
  153.             dc.w                $A82A
  154.         EndM
  155.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  156.         IMPORT_CFM_FUNCTION CMHLSToRGB
  157.     ENDIF
  158.  
  159. ;
  160. ; pascal ComponentResult CMRGBToHSV(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  161. ;
  162.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  163.         Macro
  164.         _CMRGBToHSV
  165.             move.l              #$000C0008,-(sp)
  166.             moveq               #0,D0
  167.             dc.w                $A82A
  168.         EndM
  169.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  170.         IMPORT_CFM_FUNCTION CMRGBToHSV
  171.     ENDIF
  172.  
  173. ;
  174. ; pascal ComponentResult CMHSVToRGB(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  175. ;
  176.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  177.         Macro
  178.         _CMHSVToRGB
  179.             move.l              #$000C0009,-(sp)
  180.             moveq               #0,D0
  181.             dc.w                $A82A
  182.         EndM
  183.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  184.         IMPORT_CFM_FUNCTION CMHSVToRGB
  185.     ENDIF
  186.  
  187. ;
  188. ; pascal ComponentResult CMRGBToGray(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  189. ;
  190.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  191.         Macro
  192.         _CMRGBToGray
  193.             move.l              #$000C000A,-(sp)
  194.             moveq               #0,D0
  195.             dc.w                $A82A
  196.         EndM
  197.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  198.         IMPORT_CFM_FUNCTION CMRGBToGray
  199.     ENDIF
  200.  
  201. ;
  202. ; pascal ComponentResult CMXYZToFixedXYZ(ComponentInstance ci, const CMXYZColor *src, CMFixedXYZColor *dst, unsigned long count)
  203. ;
  204.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  205.         Macro
  206.         _CMXYZToFixedXYZ
  207.             move.l              #$000C000B,-(sp)
  208.             moveq               #0,D0
  209.             dc.w                $A82A
  210.         EndM
  211.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  212.         IMPORT_CFM_FUNCTION CMXYZToFixedXYZ
  213.     ENDIF
  214.  
  215. ;
  216. ; pascal ComponentResult CMFixedXYZToXYZ(ComponentInstance ci, const CMFixedXYZColor *src, CMXYZColor *dst, unsigned long count)
  217. ;
  218.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  219.         Macro
  220.         _CMFixedXYZToXYZ
  221.             move.l              #$000C000C,-(sp)
  222.             moveq               #0,D0
  223.             dc.w                $A82A
  224.         EndM
  225.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  226.         IMPORT_CFM_FUNCTION CMFixedXYZToXYZ
  227.     ENDIF
  228.  
  229.  
  230.     ENDIF ; __CMCONVERSIONS__ 
  231.  
  232.